{{ header }}
{{ column_left }}

<div id="content">

  <div class="page-header">
    <div class="container-fluid">
      <div class="pull-right">
        <button class="btn btn-primary" form="focsseo_form" type="submit"><i class="fa fa-save"></i></button>
        <a href="" data-toggle="tooltip" title="" class="btn btn-default" data-original-title="Отменить"><i class="fa fa-reply"></i></a>
      </div>

      <h1>{{ heading_title }}</h1>

      <ul class="breadcrumb">
        {% for breadcrumb in breadcrumbs %}
          <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
        {% endfor %}
      </ul>
    </div>
  </div>

  <div class="container-fluid">
    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="panel-title">{{ heading_title }}</h3>
      </div>
      <div class="panel-body">
        <form id="focsseo_form" class="form form-horizontal" action="{{ action }}" method="POST">
          <div class="form-group">
            <div class="col-sm-12">
              <h4>{{ label_url_language_prefix }}</h4>
            </div>
          </div>

          <div class="form-group">
            <label class="control-label col-sm-2">{{ language_without_prefixes }}</label>
            <div class="col-sm-10">
              <select name="focsseo[mode]" class="form-control">
                <option value="disabled" {% if focsseo['mode'] == 'disabled' %}selected{% endif %} >{{ text_disabled }}</option>
                <option value="prefix_all" {% if focsseo['mode'] == 'prefix_all' %}selected{% endif %} >{{ entry_prefix_all }}</option>
                {% for language in languages %}
                <option value="{{ language['language_id'] }}" {% if focsseo['mode'] == language['language_id'] %}selected{% endif %}>{{ language['name'] }}</option>
                {% endfor %}
              </select>
            </div>
          </div>

          <div class="form-group">
            <div class="col-sm-12">
              <h4>{{ label_language_prefixes }}</h4>
            </div>
          </div>

          {% for language in languages %}
          <div class="form-group">
            <label class="control-label col-sm-2">{{ language['name'] }}</label>
            <div class="col-sm-10">
              <input type="text" class="form-control" name="focsseo[language_prefix][{{ language['language_id'] }}]" value="{{ focsseo['language_prefix'][language['language_id']] }}">
            </div>
          </div>
          {% endfor %}

          <div class="form-group">
            <label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
            <div class="col-sm-10">
              <select name="focsseo[module_enabled]" id="input-status" class="form-control">
                {% if focsseo['module_enabled'] %}
                <option value="1" selected="selected">{{ text_enabled }}</option>
                <option value="0">{{ text_disabled }}</option>
                {% else %}
                <option value="1">{{ text_enabled }}</option>
                <option value="0" selected="selected">{{ text_disabled }}</option>
                {% endif %}
              </select>
            </div>
          </div>

          <div class="form-group">
            <label for="" class="col-sm-2 control-label">{{ entry_disable_common_home }}</label>
            <div class="col-sm-10">
              <input type="hidden" name="focsseo[disable_common_home]" value="0">
              <div class="checkbox">
                <label>
                  <input type="checkbox" name="focsseo[disable_common_home]" value="1" {% if focsseo['disable_common_home'] %}checked{% endif %}>
                </label>
              </div>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>

{{ footer }}